package com.dp.vo;

import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Table(name = "news_rsschannel")
public class NewsRssChannel {
	private static final long serialVersionUID = 1L;
	@EmbeddedId
    protected NewsRssChannelPK newsRssChannelPK;                 
	@Column(name = "rssdesc")                
	private String rssdesc;                   
	@Column(name = "rsstimer")                
	private String rsstimer;                 
	
	public NewsRssChannel(){
	}
	
	public NewsRssChannel(NewsRssChannelPK newsRssChannelPK) {
        this.newsRssChannelPK = newsRssChannelPK;
    }

    public NewsRssChannel(Integer channelid, String rssurl) {
        this.newsRssChannelPK = new NewsRssChannelPK(channelid, rssurl);
    }
	public NewsRssChannelPK getNewsRssChannelPK() {
		return newsRssChannelPK;
	}

	public void setNewsRssChannelPK(NewsRssChannelPK newsRssChannelPK) {
		this.newsRssChannelPK = newsRssChannelPK;
	}

	public String getRssdesc() {
		return rssdesc;
	}

	public void setRssdesc(String rssdesc) {
		this.rssdesc = rssdesc;
	}

	public String getRsstimer() {
		return rsstimer;
	}

	public void setRsstimer(String rsstimer) {
		this.rsstimer = rsstimer;
	}

	@Override
	public int hashCode() {
	        int hash = 0;
	        hash += (newsRssChannelPK != null ? newsRssChannelPK.hashCode() : 0);
	        return hash;
	}

    @Override
	public boolean equals(Object object) {
	    if (!(object instanceof NewsRssChannel)) {
	          return false;
	     }
	    NewsRssChannel other = (NewsRssChannel) object;
	     if ((this.newsRssChannelPK == null && other.newsRssChannelPK != null) || (this.newsRssChannelPK != null && !this.newsRssChannelPK.equals(other.newsRssChannelPK))) {
	         return false;
	     }
	     return true;
	}
	    
	@Override
    public String toString() {
        return "com.dp.vo.NewsRssChannel[newsRssChannelPK=" + newsRssChannelPK + "]";
    }
	
}
